<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>应用列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/Application/Admin/View//Public/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/Application/Admin/View//Public/static/css/font-awesome.min.css" rel="stylesheet">
    <link href="/Application/Admin/View//Public/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Application/Admin/View//Public/static/css/animate.css" rel="stylesheet">
    <link href="/Application/Admin/View//Public/static/css/style.css" rel="stylesheet">
</head>

<body class="fixed-sidebar full-height-layout gray-bg">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
	<div class="nav-close"><i class="fa fa-times-circle"></i></div>
	<div class="sidebar-collapse">
		<ul class="nav" id="side-menu">
			<li class="nav-header">
				<div class="dropdown profile-element">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">管理系统</strong>
                                    </span>
						</span>
					</a>
				</div>
				<div class="logo-element">管理系统</div>
			</li>
			<li>
				<a class="J_menuItem" href="<?php echo U('index/index');?>">
					<i class="fa fa-home"></i>
					<span class="nav-label">主页</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('member/index');?>">
					<i class="fa fa-user"></i>
					<span class="nav-label">会员管理</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('admin/index');?>">
					<i class="fa fa-users"></i>
					<span class="nav-label">后台用户</span>
				</a>

			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('list/index');?>">
					<i class="fa fa-folder"></i>
					<span class="nav-label">应用列表</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Config/index');?>">
					<i class="fa fa-cogs"></i>
					<span class="nav-label">网站配置</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('jubao/index');?>">
					<i class="fa fa-envelope-o"></i>
					<span class="nav-label">举报信箱</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('ticket/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">工单列表</span>
				</a>
			</li>




			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Articles/advertisement');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">广告</span>
				</a>
			</li>
			<li class="line dk"></li>
			<li>
				<a href="<?php echo U('Download/index');?>">
					<i class="fa fa-file-o"></i>
					<span class="nav-label">套餐设置</span>
				</a>
			</li>
		</ul>
	</div>
</nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1" style="height: auto;">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
	<ul class="nav navbar-top-links navbar-right">
		<li class="dropdown">
			<a href="<?php echo U('login/delcache');?>" class="dropdown-toggle count-info"><i class="fa fa-check"></i> 清除缓存</a>
		</li>
		<li class="dropdown">
			<a href="<?php echo U('login/logout');?>" class="dropdown-toggle count-info"><i class="fa fa-power-off"></i> 退出</a>
		</li>
	</ul>
</nav>
        <div class="row J_mainContent" id="content-main">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-md-8">
                                <a class="btn btn-success" href="<?php echo U('Articles/insertad');?>">
                                    <i class="fa fa-user-plus"></i> 添加网址
                                </a>
                            </div>
                            <div class="col-sm-4">
                                <form action="<?php echo U('Articles/advertisement');?>" method="post">
                                    <div class="form-group input-group">
                                        <input type="text" class="form-control" name="key" placeholder="输入应用名称搜索">
                                        <span class="input-group-btn">
                                         <input class="btn btn-default" type="submit" value="提交">
                                        </span>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>名称</th>
                                    <th>苹果地址</th>
                                    <th>安卓地址</th>
                                    <th>图片</th>
                                    <th>开始时间</th>
                                    <th>结束时间</th>
                                    <th>广告词</th>
                                    <!--<th>点击次数</th>-->
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php if(is_array($articles)): foreach($articles as $k=>$v): ?><tr>
                                        <td><input type="checkbox" class="i-checks" value="<?php echo ($v["id"]); ?>"><?php echo ($v["arid"]); ?></td>
                                        <td><?php echo ($v["arname"]); ?></td>
                                        <td><?php echo ($v["arios"]); ?></td>
                                        <td><?php echo ($v["arandroid"]); ?></td>
                                        <td >
                                            <!--<img src="__IMG__<?php echo ($v["arimgs"]); ?>"  height="50" width="50" alt="" />-->
                                            <?php if($v["arimgs"] != ''): ?><img src="__IMG__<?php echo ($v["arimgs"]); ?>" class="img-rounded" height="50" width="50" />
                                                <?php else: ?>
                                                <img src="data:image/png;base64,<?php echo ($v["spare2"]); ?>" class="img-rounded" height="50" width="50" style="margin-top:0px;margin-bottom:14px;"/><?php endif; ?>
                                        </td>
                                        <td><?php echo ($v["starttime"]); ?></td>
                                        <td><?php echo ($v["endtime"]); ?></td>
                                        <td><?php echo ($v["remark"]); ?></td>
                                        <!--<td><?php echo ($v["upnum"]); ?></td>-->
                                        <td>
                                            <a href="<?php echo U('Articles/updatead',array('id'=>$v['arid']));?>">编辑</a>|
                                            <a href="<?php echo U('Articles/deletead',array('id'=>$v['arid']));?>" style="color:red;" onclick="javascript:return del('您真的确定要删除吗？\n\n删除后将不能恢复!');">删除</a>
                                        </td>
                                    </tr><?php endforeach; endif; ?>
                                </tbody>
                            </table>
                            <?php echo ($page); ?>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
</body>

<!-- 全局js -->
<script type="text/javascript" src="/Application/Admin/View//Public/static/js/jquery-1.11.1.min.js"></script>
<script src="/Application/Admin/View//Public/static/js/bootstrap.min.js"></script>
<script src="/Application/Admin/View//Public/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/Application/Admin/View//Public/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/Application/Admin/View//Public/static/js/plugins/layer/layer.min.js"></script>
<script type="text/javascript" src="/Application/Admin/View//Public/static/js/jszip.min.js"></script>
<script type="text/javascript" src="/Application/Admin/View//Public/static/js/base64.min.js"></script>
<script type="text/javascript" src="/Application/Admin/View//Public/static/js/common.js"></script>
<!-- 自定义js -->
<script src="/Application/Admin/View//Public/static/js/hAdmin.js"></script>
<script src="/Application/Admin/View//Public/static/js/content.js"></script>
<!-- 第三方插件 -->
<script src="/Application/Admin/View//Public/static/js/plugins/pace/pace.min.js"></script>
<!-- iCheck -->
<script src="/Application/Admin/View//Public/static/js/plugins/iCheck/icheck.min.js"></script>
</html>
<script>

    $(document).ready(function() {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });

</script>